
<include file="public/layout" />
<script type="text/javascript" src="__ROOT__/public/static/js/layer/laydate/laydate.js"></script>

<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>分成记录列表</h3>
                <h5>分销关系管理</h5>
            </div>
        </div>
    </div>
    <!-- 操作说明 -->
    <div id="explanation" class="explanation" style="color: rgb(44, 188, 163); background-color: rgb(237, 251, 248); width: 99%; height: 100%;">
        <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span title="收起提示" id="explanationZoom" style="display: block;"></span>
        </div>
        <ul>
            <li>点击"订单编号"查看订单详情</li>
            <li>根据用户ID、订单编号和时间查询</li>
        </ul>
    </div>
    <div class="flexigrid">
        <div class="mDiv">
            <div class="ftitle">
                <h3>分成记录列表</h3>
                <h5>(共{$pager->totalRows}条记录)</h5>
            </div>
            <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
            <form class="navbar-form form-inline"  method="post" action=""  name="search-form2" id="search-form2">
                <div class="sDiv">
                    <div class="sDiv2">
                        <input type="text" size="30" id="user_id" placeholder="获佣用户手机号"  value="{$mobile}" name="mobile" class="qsbox">
                    </div>
                    <div class="sDiv2">
                        <input type="text" size="30" id="order_sn" placeholder="订单编号" value="{$order_sn}" name="order_sn" class="qsbox" >
                    </div>
                    <div class="sDiv2">
                        <input type="text" size="30" id="start_time" placeholder="生成日志开始时间" value="{$start_time}" name="start_time" class="qsbox" >
                    </div>
                    <div class="sDiv2">
                        <input type="text" size="30" id="end_time" placeholder="生成日志结束时间" value="{$end_time}" name="end_time" class="qsbox">
                    </div>
                    <div class="sDiv2">
                        <select class="select" id="status" name="status">
                            <option value="">全部</option>
                            <option value="0"<if condition="$_REQUEST['status'] heq '0'">selected</if>>未付款</option>
                            <option value="1"<if condition="$_REQUEST['status'] eq 1">selected</if>>已付款</option>
                            <option value="2"<if condition="$_REQUEST['status'] eq 2">selected</if>>等待分成</option>
                            <option value="3"<if condition="$_REQUEST['status'] eq 3">selected</if>>已分成</option>
                            <option value="4"<if condition="$_REQUEST['status'] eq 4">selected</if>>已取消</option>
                        </select>
                    </div>
                    <div class="sDiv2">
                        <input type="submit" class="btn" value="搜索">
                    </div>
                </div>
            </form>
        </div>
        <div class="hDiv">
            <div class="hDivBox" id="ajax_return">
                <table cellspacing="0" cellpadding="0">
                    <thead>
                    <tr>
                        <th class="sign" axis="col0">
                            <div style="width: 24px;"><i class="ico-check"></i></div>
                        </th>
                        <th align="left" abbr="order_sn" axis="col3" class="">
                            <div style="text-align: left; width: 50px;" class="">ID</div>
                        </th>
                        <th align="left" abbr="consignee" axis="col4" class="">
                            <div style="text-align: left; width: 120px;" class="">获佣用户</div>
                        </th>
                        <th align="left" abbr="consignee" axis="col4" class="">
                            <div style="text-align: left; width: 120px;" class="">下单会员</div>
                        </th>
                        <th align="center" abbr="article_show" axis="col5" class="">
                            <div style="text-align: center; width: 160px;" class="">订单编号</div>
                        </th>
                        <th align="center" abbr="article_time" axis="col6" class="">
                            <div style="text-align: center; width: 120px;" class="">获佣金额</div>
                        </th>
                        <th align="center" abbr="article_time" axis="col6" class="">
                            <div style="text-align: center; width: 120px;" class="">订单金额</div>
                        </th>
                        <th align="center" abbr="article_time" axis="col6" class="">
                            <div style="text-align: center; width: 120px;" class="">获佣用户级别</div>
                        </th>
                        <th align="center" abbr="article_time" axis="col6" class="">
                            <div style="text-align: center; width: 160px;" class="">记录生成时间</div>
                        </th>
                        <th align="center" abbr="article_time" axis="col6" class="">
                            <div style="text-align: center; width: 90px;" class="">状态</div>
                        </th>
                        <th style="width:100%" axis="col7">
                            <div></div>
                        </th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="bDiv" style="height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table cellspacing="0" cellpadding="0">
                    <tbody>
                    <if condition="empty($list) eq true">
                        <tr data-id="0">
                            <td class="no-data" align="center" axis="col0" colspan="50">
                                <i class="fa fa-exclamation-circle"></i>没有符合条件的记录
                            </td>
                        </tr>
                        <else/>
                        <volist name="list" id="v">
                            <tr>
                                <td class="sign" axis="col0">
                                    <div style="width: 24px;"><i class="ico-check"></i></div>
                                </td>
                                <td align="left" abbr="order_sn" axis="col3" class="">
                                    <div style="text-align: left; width: 50px;" class="">{$v.id}</div>
                                </td>
                                <td align="left" abbr="consignee" axis="col4" class="">
                                    <div style="text-align: left; width: 120px;" class="">
                                        <a href="{:U('Admin/user/detail',array('id'=>$v[buy_user_id]))}">
                                            <if condition="$v[fl_nickname] neq '' ">
                                                {$v[fl_nickname]}
                                                <elseif condition="$v[fl_email] neq ''"/>
                                                {$v[fl_email]}
                                                <else />{$v[fl_mobile]}</if>
                                        </a>
                                    </div>
                                </td>
                                <td align="left" abbr="consignee" axis="col4" class="">
                                    <div style="text-align: left; width: 120px;" class="">
                                        <a href="{:U('Admin/user/detail',array('id'=>$v[buy_user_id]))}">
                                            <if condition="$v[nickname] neq '' ">
                                                {$v[nickname]}
                                                <elseif condition="$v[email] neq ''"/>
                                                {$v[email]}
                                                <else />{$v[mobile]}</if>
                                        </a>
                                    </div>
                                </td>
                                <td align="center" abbr="article_show" axis="col5" class="">
                                    <div style="text-align: center; width: 160px;" class="">
                                        <a href="{:U('Admin/order/detail',array('order_id'=>$v[order_id]))}">
                                            {$v.order_sn}
                                        </a>
                                    </div>
                                </td>
                                <td align="center" abbr="article_time" axis="col6" class="">
                                    <div style="text-align: center; width: 120px;" class="">{$v.money}</div>
                                </td>
                                <td align="center" abbr="article_time" axis="col6" class="">
                                    <div style="text-align: center; width: 120px;" class="">{$v.goods_price}</div>
                                </td>
                                <td align="center" abbr="article_time" axis="col6" class="">
                                    <div style="text-align: center; width: 120px;" class="">
                                        <if condition="$v[dislevel] eq 1"> 一级合伙人
                                            <elseif condition="$v[dislevel] eq 2"/>二级合伙人
                                            <else /> 三级合伙人
                                        </if>
                                    </div>
                                </td>
                                <td align="center" abbr="article_time" axis="col6" class="">
                                    <div style="text-align: center; width: 160px;" class="">{$v.create_time|date="Y-m-d H:i:s",###}</div>
                                </td>
                                <td align="center" abbr="article_time" axis="col6" class="">
                                    <div style="text-align: center; width: 90px;" class="">
                                        <if condition="$v[status] eq 0">未付款</if>
                                        <if condition="$v[status] eq 1">已付款</if>
                                        <if condition="$v[status] eq 2">等待分成</if>
                                        <if condition="$v[status] eq 3">已分成</if>
                                        <if condition="$v[status] eq 4">已取消</if>
                                    </div>
                                </td>
                                <td style="width:100%" axis="col7">
                                    <div></div>
                                </td>
                            </tr>
                        </volist>
                    </if>
                    </tbody>
                </table>
            </div>
            <div class="iDiv" style="display: none;"></div>
        </div>
        <!--分页位置-->
        <div class="row">
            <div class="col-sm-6 text-left"></div>
            <div class="col-sm-6 text-right">{$show}</div>
        </div>
    </div>
</div>
<script type="text/javascript">


    $(document).ready(function(){


        // 点击刷新数据
        $('.fa-refresh').click(function(){
            location.href = location.href;
        });

        $('#start_time').layDate(1);
        $('#end_time').layDate(1);

        $('.ico-check ' , '.hDivBox').click(function(){
            $('tr' ,'.hDivBox').toggleClass('trSelected' , function(index,currentclass){
                var hasClass = $(this).hasClass('trSelected');
                $('tr' , '#flexigrid').each(function(){
                    if(hasClass){
                        $(this).addClass('trSelected');
                    }else{
                        $(this).removeClass('trSelected');
                    }
                });
            });
        });
    });


</script>
</body>
</html>